import request from '@/axios'

export const getAuth = (bucket, region) => {
  return new Promise((resolve, reject) => {
    request({
      url: '/tx/cos',
      type: 'get',
      params: {
        bucket,
        region
      }
    }).then(res => {
      resolve(res)
    }).catch(error => {
      reject(error)
    })
  })
}
